/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mattespill.gui;


import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionListener;
import javax.swing.JButton;




import javax.swing.JLabel;




import javax.swing.JPanel;
import mattespill.Oversikt;




/**
 *
 * @author havardaxelsen
 */
public class GUIStatus extends JPanel{
    
  
    private Frame poeng ;
    private Frame penger;
    private Frame liv;
    private Frame nivaa;
    
    
    public GUIStatus(Oversikt o){
        setSize(new Dimension(800,50));
        setLayout(new GridLayout(1,5));
        
        setBackground(new Color(0,0,0,150));
        
        poeng       = new Frame("Poeng: "+ o.getStatus().getPoeng());
        penger      = new Frame("Penger: "+o.getStatus().getPenger());
        liv         = new Frame("Liv: "+o.getStatus().getLiv());
        nivaa       = new Frame("Nivå: "+o.getNivaa());
        
       
        add(poeng);
        add(penger);
        add(liv);
        add(nivaa);
        
        
        
    
    }

    public Frame getLiv() {
        return liv;
    }

    public void setLiv(int l) {
        this.liv.setText("Liv: "+l);
    }

    public Frame getNivaa() {
        return nivaa;
    }

    public void setNivaa(int n) {
        this.nivaa.setText("Nivå: "+n);
    }

    public Frame getPenger() {
        return penger;
    }

    public void setPenger(int p) {
        this.penger.setText("Penger: "+p);
    }

    public Frame getPoeng() {
        return poeng;
    }

    public void setPoeng(int p) {
        this.poeng.setText("Poeng: "+p);
    }
}
class Frame extends JLabel{
    
    public Frame(String t){
        this.setText(t);
        this.setForeground(new Color(255,255,255));
        setPreferredSize(new Dimension(200,20));
        
    }
    public Frame(int i){
        
        String s = Integer.toString(i);
        this.setText(s);
        
    }
    
}